﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TorchView.GameContent.Data;
using System.ComponentModel;

namespace TorchView.GameContent.Skills
{
  public sealed class SkillLevel : SkillBase
  {
    public const string BLOCK_NAME = "LEVEL";
    public static readonly string[] DECENDANT_TYPES = new string[] { "AFFIXES", "AFFIXESREMOVE", "EFFECTS", "EFFECTSREMOVE", "EVENT" };

    protected override string GetBlockName()
    {
      return BLOCK_NAME + Level;
    }

    public override void LoadFromDataBlock(DataBlock block)
    {
      int level;
      int.TryParse(block.Name.Replace(BLOCK_NAME, ""), out level);
      Level = level;
      base.LoadFromDataBlock(block);
    }

    // Methods
    public int Level { get; set; }
  }
}
